﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using FluentFTP.Model;
using FluentFTP.ViewModel;

namespace FluentFTP.View
{
    /// <summary>
    /// Interaction logic for EditServerView.xaml
    /// </summary>
    public partial class EditServerView : Window
    {
        private EditServerViewModel viewModel;

        public EditServerView()
        {
            InitializeComponent();

            viewModel = new EditServerViewModel();
            DataContext = viewModel;
        }

        public EditServerView(FtpServerInfo server)
            : this()
        {
            viewModel.Server = server;
        }

        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }
    }
}
